home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / cg / savestate.rexx < prev    next >
OS/2 REXX Batch file  |  1995-12-28  |  1KB  |  46 lines

  1. /* SaveState -- Save the state of the CG. */
  2. /* By Bob Caron ©1994 NewTek, Inc.        */
  3.  
  4. call addlib(CG_AREXX,0)
  5. outfile="Toaster:Arexx/CG/Startup.Rexx"
  6.  
  7. call req_bar("Saving State...")
  8.  
  9. if (~open(outfd,outfile,W)) then
  10.    call REQ_TELL("Can't open output:",outfile)
  11.  
  12.    writeln(outfd,"/* StartUp.Rexx -- Startup Script       */")
  13.    writeln(outfd,"/* By A. Random User ©1994 NewTek, Inc. */")
  14.    writeln(outfd,"/* (Based on a program by Bob Caron.)   */")
  15.    writeln(outfd,"")
  16.    writeln(outfd,"call addlib(CG_AREXX,0)")
  17.    writeln(outfd,"")
  18.    writeln(outfd,"call pickpage(NOT)")
  19.    writeln(outfd,"")
  20.  
  21.    null=get_font(FIRST)
  22.  
  23. do while (font~="")
  24.    fontnsize=get_font(next)
  25.    font=fontnsize
  26.    if lastpos(',',fontnsize)~=0 then do
  27.       sizefnt=right(fontnsize,(length(fontnsize)-lastpos(',',fontnsize,length(fontnsize)-1)))
  28.       font=left(fontnsize,(lastpos(',',fontnsize,length(fontnsize))-1))
  29.       end
  30.  
  31.    if font~="CommonThin.10" then
  32.       if (font~="") then writeln(outfd,'LOADFONT("'||font||'",'||sizefnt||')')
  33.  
  34.    end
  35.  
  36.    writeln(outfd,"")
  37.    writeln(outfd,"CALL REMLIB('CG_AREXX')")
  38.  
  39.    call close(outfd)
  40.    call REQ_TELL("Fonts Saved...")
  41.    call req_bar("ToasterCG")
  42.    call REMLIB(CG_AREXX)
  43. exit
  44.  
  45.  
  46.